package coreentity

import (
	"core/coreinfo"
	"core/corestruct"
	"core/coreutil"
	"reflect"
)

type HtCls struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	PrjName    string               `json:"prjName"      validate:"max=20"   gorm:"column:prj_name;size:20;DEFAULT:'';not null;comment:代码名称;"`
	FullName   string               `json:"fullName"     validate:"max=100"  gorm:"column:full_name;size:100;DEFAULT:'';not null;comment:类名称;"`
	Name       string               `json:"name"         validate:"max=50"   gorm:"column:name;size:50;DEFAULT:'';not null;comment:类名称;"`
	Memo       string               `json:"memo"                             gorm:"column:memo;size:200;DEFAULT:'';not null;comment:备注;"`
	BaseType   string               `json:"baseType"     validate:"max=50"   gorm:"column:base_type;size:50;DEFAULT:'';not null;comment:类型;"`
	JsonFields string               `json:"jsonFields"                       gorm:"column:json_fields;type:longtext;not null;comment:Json数据;"`
	CrtDt      corestruct.MyTime    `json:"crtDt"                            gorm:"column:crt_dt;not null;comment:创建日期;"`
	EdtDt      corestruct.MyTime    `json:"edtDt"                            gorm:"column:edt_dt;not null;comment:更新日期;"`
	Deleted    corestruct.DeletedAt `json:"deleted"                          gorm:"column:deleted;DEFAULT:0;type:tinyint(1);not null;comment:删除标志;"`
}

func (p *HtCls) TableName() string {
	return "HtCls"
}
func HtClsInit() {
	var mcls = &HtCls{}
	var m = &corestruct.MyClass{
		Name:     "开发类型表",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddEntity(m)
}
